Skip to content

Conversation

@sampokuokkanen
Copy link

Continuation of #20, so thanks for raerkeer for starting the task.

The conn ended up missing :locale assign, so used the pipe operator
there. Also added tests to see if the session actually contains the
locale.

okuyamacode and others added 3 commits April 11, 2021 14:18
To get set_locale working with Phoenix LiveView, we need to put the locale into the session
The conn ended up missing :locale assign, so used the pipe operator
there. Also added tests to see if the session actually contains the
locale.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.305% when pulling d6242f5 on sampokuokkanen:liveview-fix into 9b3b496 on smeevil:master.

@KristerV
Copy link

KristerV commented Apr 1, 2024

bump. is this branch the way to go currently?

edit: currently this doesn't work. gives error.

==> set_locale
Compiling 2 files (.ex)
    error: module Plug.Conn is not loaded and could not be found
    │
  2 │   import Plug.Conn
    │   ^
    │
    └─ lib/set_locale.ex:2:3: SetLocale (module)


== Compilation error in file lib/set_locale.ex ==
** (CompileError) lib/set_locale.ex: cannot compile module SetLocale (errors have been logged)

@sampokuokkanen
Copy link
Author

I think the Plug.Conn compilation error is because we have to define either cowboy or bandit as a dependency now to use Plug. (I'm not completely sure here though)

Tried to update this branch to use the latest version of Phoenix (to get it even to compile on my machine), but I have 18 tests failing now, and I'm not currently using this library so I don't think I'll have time to fix everything going wrong there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants